package kcms.db;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "view_message", catalog = "kcms")
public class ViewMessage implements java.io.Serializable {
	private ViewMessageId id;
	private boolean status;
	
	public ViewMessage() {
		super();
	}

	public ViewMessage(ViewMessageId id) {
		super();
		this.id = id;
	}
	@EmbeddedId
	@AttributeOverrides({
		@AttributeOverride(name = "messageid", column = @Column(name = "messageid", nullable = false)),
		@AttributeOverride(name = "cname", column = @Column(name = "cname", nullable = false)),
		@AttributeOverride(name = "receiverCsn", column = @Column(name = "receiverCsn", nullable = false)),
		@AttributeOverride(name = "description", column = @Column(name = "description", nullable = false)),
		@AttributeOverride(name = "sender", column = @Column(name = "sender", nullable = false)),
		@AttributeOverride(name = "cid", column = @Column(name = "cid", nullable = false)),
		@AttributeOverride(name = "time", column = @Column(name = "time", nullable = false)),
		@AttributeOverride(name = "realname", column = @Column(name = "realname", nullable = false)),
		@AttributeOverride(name = "sid", column = @Column(name = "sid", nullable = false)) })
	public ViewMessageId getId() {
		return id;
	}

	public void setId(ViewMessageId id) {
		this.id = id;
	}
	@Column(name = "status", nullable = false)
	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}
}
